<?php
/**
 * Each engineer has a duty to keep the code elegant
 * Created by wolffy.
 * Author @wolffy<13750088090@sina.cn>
 * Date: 2018/9/5
 * Time: 00:09
 */
namespace App\Http\Controllers\Web;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class RegisterController extends Controller
{
    public function index(Request $request)
    {
        $appUrl = config('app.url');
        $invitedCode = $request->invited_code;
        if (isset($request->type) && $request->type == 'register') {
            return view('web.user.register', compact('appUrl', 'invitedCode'));
        }
        return view('web.user.index', compact('appUrl', 'invitedCode'));
    }

    /**
     * 隐私协议
     */
    public function privacyAgreement()
    {
        return view('web.user.privacyAgreement');
    }

    /**
     * 服务协议
     */
    public function serverAgreement()
    {
        return view('web.user.serverAgreement');
    }
}